package com.jfinal.ext.plugin.mail;

import org.jetbrains.annotations.NotNull;

import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.internet.MimeMessage;

/**
 * @author Timor
 * @version 1.0
 * @date 2024/06/10 10:15:12
 */
public interface IMessageGetter {

    /**
     * create by session
     *
     * @param session session
     * @return message
     * @throws MessagingException exception
     */
    @NotNull
    MimeMessage apply(@NotNull Session session) throws MessagingException;

}
